package com.marketlive.app.b2c.common.constants;

/*
(C) Copyright MarketLive. 2006. All rights reserved.
MarketLive is a trademark of MarketLive, Inc.
Warning: This computer program is protected by copyright law and international treaties.
Unauthorized reproduction or distribution of this program, or any portion of it, may result
in severe civil and criminal penalties, and will be prosecuted to the maximum extent
possible under the law.
*/

/**
 * Constants for Request Parameter and Session Attribute names.
 */
public final class RequestParams {

    /** Parameter used for action methods. */
    public static final String METHOD = "method";
    /** Parameter used for action methods. */
    public static final String METHOD_SUBMIT = "submit";
    /** Parameter used for action methods. */
    public static final String METHOD_VIEW = "view";
    /** Parameter used for action methods. */
    public static final String METHOD_REMOVE = "remove";
    /** Parameter used for action methods. */
    public static final String METHOD_RETURN = "methodReturn";
    /** Parameter used for action methods. */
    public static final String METHOD_PREVIEW = "preview";
    /** Parameter used for action methods. */
    public static final String METHOD_SEND = "send";
    /** Parameter used for action methods. */
    public static final String METHOD_EDIT = "edit";
    /** Parameter used for action methods. */
    public static final String METHOD_CONTINUE_NO_SAVE = "continueNoSave";
    /** Parameter used for action methods. */
    public static final String METHOD_SAVE_AND_ADD = "saveAndAdd";
    /** Parameter used for action methods. */
    public static final String METHOD_SAVE_AND_CONTINUE = "saveAndContinue";

    /** Common request parameter. */
    public static final String HREF_REQUEST_PARAM_NAME = "href";
    /** Common request parameter. */
    public static final String SHOW_CHANGES = "showChanges";
    /** Common request parameter. */
    public static final String ITEM_ID = "itemID";
    /** Common request parameter. */
    public static final String ITEM_TYPE = "itemType";
    /** Common request parameter. */
    public static final String ITEMS_ADD = "itemsadd";

    /** Used by Wish List actions. */
    public static final String INITIAL = "initial";
    /** Used by Wish List actions. */
    public static final String WISHLIST_ID = "wlid";
    /** Used by Wish List actions. */
    public static final String WISHLIST_FORM = "wishlistForm";

    /** Used by Account actions. */
    public static final String ACCOUNT_REQUEST_PARAM_NAME = "account";
    /** Used by Account actions. */
    public static final String ACCOUNT_FORM = "accountRegisterForm";
    /** Used by Account actions. */
    public static final String CHECKOUT_FORM = "checkoutForm";
    /** Used by Account actions. */
    public static final String FROM = "from";
    /** Used by Account actions. */
    public static final String HINT = "hint";

    /** Used by DisplayAction/JumpAction. */
    public static final String RULE_ID = "ruleID";
    /** Used by DisplayAction/JumpAction. */
    public static final String CODE = "code";

    /** Parameter for BasicSiteSearchAction and AdvancedSiteSearchAction. */
    public static final String KEYWORD = "keyword";

    public static final String QUERY = "query";
    /** Parameter for BasicSiteSearchAction and AdvancedSiteSearchAction. */
    public static final String INIT = "init";
    /** Parameter for BasicSiteSearchAction and AdvancedSiteSearchAction. */
    public static final String PAGE = "page";
    public static final String PRODUCTS_PER_PAGE = "pp";

    /** Parameter for SortingAction. */
    public static final String SORTBY = "sortby";
    /** Parameter for SortingAction. */
    public static final String ASC = "asc";
    /** Parameter for the Search Down page. */
    public static final String SEARCHDOWN = "searchdown";

    /** Session attribute to get CommerceSession. */
    public static final String COMMERCE_SESSION = "COMMERCE_SESSION";

    /**
    * Constant for the name of the content manager request attribute.
    */
    public static final String CONTENT_MANAGER_REQUEST_ATTRIBUTE = "ContentManager";

    /** Parameter used by AddressBook Action. */
    public static final String CONTACT_ID = "id";
    /** Parameter used by AddressBook Action. */
    public static final String PAGE_REQUEST_PARAM = "page";
    /** Parameter used by AddressBook Action. */
    public static final String HREF_ACCOUNT = "account";
    /** Parameter used by AddressBook Action. */
    public static final String HREF_CHECKOUT = "checkout";
    /** Parameter used by AddressBook Action. */
    public static final String HREF_CATALOG_REQUEST = "catalogrequest";

    /** Parameters used by Order History Actions. */
    public static final String ORDER_NUMBER = "orderNumber";

    /** Parameters used by Log In/Log out Actions. */
    /** Session attribute name identifying user interstitial login. */
    public static final String INTERSTITIAL_LOGIN = "stackBean";
    /** Referrer. */
    public static final String REFERRER = "referrer";

    /** Parameters used by Tell A Friend. */
    public static final String TAF_ID = "tafId";
    /** Parameters used by Tell A Friend. */
    public static final String TAF_SENT = "tafSent";

    /** Used by NavState to store itself in request scope for JSPs. */
    public static final String NAVSTATE = "NavState";

    /** NavState contains product or category location. */
    public static final String NAVSTATE_NAV = "nav";

    /** NavState contains list of category items. */
    public static final String NAVSTATE_ITEMS = "items";

    /** NavState search context: basic or advanced. */
    public static final String NAVSTATE_SEARCH = "search";

    /** Parameter used to mark the "starting" page of a multi-page P2P interaction. * */
    public static final String NAVSTATE_FROM = "from";
    /** Request attribute name used by the product thumbnail tile. */
    public static final String THUMBNAIL_FROM_PARAM = "fromParam";
    /** Request param value paired with NAVSTATE_FROM (from=fn) to determine if the user came from a facetedNav page. */
    public static final String FROM_FACETED_NAV = "fn";

    /**
    * Parameter used to keep track of requested personalizations during the kit add to basket and configuration flow.
    */
    public static final String PERSONALIZATIONS_REQUESTED = "personalizationsRequested";

    /** Parameter used for printing a order receipt. */
    public static final String PRINT_RECEIPT = "printReceipt";

    /** Parameter used to display Recently Viewed Items in the left nav. */
    public static final String RECENTLY_VIEWED_IN_LEFT_NAV = "leftNavRecentlyViewed";

    /** Parameter used to identify the current site section. **/
    public static final String SHOW_LEFT_NAV = "showLeftNav";
    public static final String SITE_SECTION = "siteSection";
    public static final String SECTION_ACCOUNT = "Account";
    public static final String SECTION_DETAIL_SUPPORT = "DetailSupport";
    public static final String SECTION_DETAIL = "Detail";
    public static final String SECTION_P2P = "P2P";
    public static final String SECTION_SEARCH = "Search";
    public static final String SECTION_ANCILLARY = "Ancillary";
    public static final String SECTION_CATEGORY = "Category";

    public static final String LOCALE = "locale";

    /** Parameter used to identify the link from global cart to basket. This is used for reporting. **/
    public static final String GLOBAL_CART = "gc";
    public static final String GLOBAL_CART_USED = "1";

    /** Parameters used to identify the type of nav used to browse the site. This is used for reporting. **/
    public static final String NAVAGATION_TYPE = "nType";
    public static final String NAVAGATION_TYPE_TOP_NAV = "1";
    public static final String NAVAGATION_TYPE_LEFT_NAV = "2";
    public static final String NAVAGATION_TYPE_SUBCAT_NAV = "3";

    /** A generic param used to track types of referrals when landing on a product page. **/
    public static final String REFERRAL_TYPE = "refType";
    public static final String REFERRAL_TYPE_CROSSSELL = "1";
    public static final String REFERRAL_TYPE_UPSELL = "2";
    public static final String REFERRAL_TYPE_SUBSTITUTION = "3";
    public static final String REFERRAL_TYPE_RECENTLYVIEWED = "4";
    public static final String REFERRAL_TYPE_WISHLIST = "5";

    /** Parameters used to identify the type of sort. This is used for reporting. **/
    public static final String SORT_TYPE = "sortType";
    public static final String SORT_TYPE_USER = "1";

    /** Parameters used to identify the type of update action performed on basket.
     *  This is used for reporting.
    **/
    public static final String UPDATE_TYPE = "updateType";
    public static final String UPDATE_TYPE_USER = "1";
    public static final String UPDATE_TYPE_ESTIMATED_TAX_SHIPPING = "2";

    /** Parameters used to identify the first index and last index for a Carousel AJAX calling
    **/
    public static final String CAROUSEL_FIRST = "first";
    public static final String CAROUSEL_LAST = "last";
    public static final String CAROUSEL = "carousel";
    public static final String CAROUSEL_TYPE = "true";
    public static final String CAROUSEL_CURRENT_INDEX = "curIndex";

    /** EnhancedQuickView
    **/
    public static final String QVE_FROM = "qveFrom";
    public static final String QVE_QUANTITY = "qveQty";
    public static final String QVE_PRODUCTPK = "qveProductpk";

    // contains the Omniture page name (variable: s.pageName) of the last page that the B2C user visited.
    public static final String PREVIOUS_PAGE_NAME = "pageName";

    public static final String ACTION = "action";

    public static final String AUTOCOMPLETE_PARAM_VALUE = "ac";
}
